package acl

import (
	"gitee.com/mkwchecking/sr-admin/apps/devtools/entity"
	"gitee.com/mkwchecking/sr-admin/pkg/http/acl"
)

type ModuleTableInsertReq struct {
	entity.ModuleTable
}

type ImportDBTable struct {
	Schema    string `json:"schema" form:"schema"`
	TableName string `json:"tableName" form:"tableName"`
}

type ModuleTableUpdateReq struct {
	entity.ModuleTable
}

type ModuleTableListReq struct {
	entity.ModuleTable
	acl.PageReq
	acl.OrderReq
}

type ModuleTableDetailReq struct {
	Domain      string                `json:"domain" form:"domain" find:"match:eq"`
	ClassName   string                `json:"className" form:"className" find:"match:eq"`
	DBTable     string                `json:"dbTable" form:"dbTable"`
	Comment     string                `json:"comment" form:"comment"`
	DomainRoute string                `json:"domainRoute" form:"domainRoute"`
	ClassRoute  string                `json:"classRoute" form:"classRoute"`
	Auth        int                   `json:"auth" form:"auth"`
	Fields      []*entity.ModuleField `json:"fields" form:"fields"`
}

type ModuleTableDeleteReq struct {
	entity.ModuleTable
}

type ModuleTableRemoveFieldReq struct {
	Domain     string   `json:"domain" form:"domain" find:"match:eq"`
	ClassName  string   `json:"className" form:"className" find:"match:eq"`
	FieldNames []string `json:"fieldNames" form:"fieldNames"`
}

type ModuleTableUpdateFieldReq struct {
	Domain    string             `json:"domain" form:"domain" find:"match:eq"`
	ClassName string             `json:"className" form:"className" find:"match:eq"`
	Field     entity.ModuleField `json:"field" form:"field"`
}
